class CodeMsg(object):
    def __init__(self, code: int, message: str):
        self.code = code
        self.message = message

    def set_code(self, code: int):
        self.code = code
        return self

    def set_message(self, message: str):
        self.message = message
        return self


SUCCESS: CodeMsg = CodeMsg(0, "操作成功")
ServerError: CodeMsg = CodeMsg(500, "服务器繁忙")
InvalidRequest: CodeMsg = CodeMsg(1001, "无效的请求")
InvalidParams: CodeMsg = CodeMsg(1002, "无效的参数")
BusinessError: CodeMsg = CodeMsg(1003, "业务错误")
DataNotFound: CodeMsg = CodeMsg(1004, "查询失败")
DataStoreFail: CodeMsg = CodeMsg(1005, "新增失败")
DataUpdateFail: CodeMsg = CodeMsg(1006, "更新失败")
DataDestroyFail: CodeMsg = CodeMsg(1007, "删除失败")
PermissionDenied: CodeMsg = CodeMsg(1008, "权限拒绝")
